package com.fau.wmbj.server.flowable.entity;

import com.fau.wmbj.server.flowable.domain.vo.ParticipantVo;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 任务视图
 */

@Getter
@Setter
@Entity(name = "ACT_RU_TASK")
public class ActRuTask implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 任务id
     */
    @Id
    @Column(name = "ID_")
    private String taskId;

    /**
     * 任务名称
     */
    @Column(name = "NAME_")
    private String name;

    /**
     * 描述
     */
    @Column(name = "DESCRIPTION_")
    private String description;

    /**
     * 优先级
     */
    @Column(name = "PRIORITY_")
    private Integer priority;

    /**
     * 负责此任务的人员的用户id
     */
    @Column(name = "OWNER_")
    private String owner;

    /**
     * 办理人id
     */
    @Column(name = "ASSIGNEE_")
    private Long assignee;

    /**
     * 流程实例id
     */
    @Column(name = "PROC_INST_ID_")
    private String processInstanceId;

    /**
     * 执行id
     */
    @Column(name = "EXECUTION_ID_")
    private String executionId;

    /**
     * 无用
     */
    @Column(name = "TASK_DEF_ID_")
    private String taskDefinitionId;

    /**
     * 流程定义id
     */
    @Column(name = "PROC_DEF_ID_")
    private String processDefinitionId;

    /**
     * 创建时间
     */
    @Column(name = "CREATE_TIME_")
    private Date createTime;



    /**
     * 节点id
     */
    @Column(name = "TASK_DEF_KEY_")
    private String taskDefinitionKey;

    /**
     * 任务截止日期
     */
    @Column(name = "DUE_DATE_")
    private Date dueDate;

    /**
     * 流程类别
     */
    @Column(name = "CATEGORY_")
    private String category;

    /**
     * 父级任务id
     */
    @Column(name = "PARENT_TASK_ID_")
    private String parentTaskId;

    /**
     * 租户id
     */
    @Column(name = "TENANT_ID_")
    private String tenantId;

    /**
     * 已办任务-创建时间
     */
    @Transient
    private Date startTime;

    /**
     * 流程定义版本
     */
    @Transient
    private Integer processDefinitionVersion;

    /**
     * 流程定义key
     */
    @Transient
    private String processDefinitionKey;
    /**
     * 结束时间
     */
    @Transient
    private Date endTime;

    /**
     * 认领时间
     */
    @Transient
    private Date claimTime;
    /**
     * 业务id
     */
    @Transient
    private String businessKey;

    /**
     * 是否会签
     */
    @Transient
    private Boolean multiInstance;

    /**
     * 参与者
     */
    @Transient
    private ParticipantVo participantVo;

    /**
     * 办理人
     */
    @Transient
    private String assigneeName;

    @Transient
    private String processDefinitionName;

    /**
     * 流程状态
     */
    @Transient
    private String businessStatus;

    /**
     * 流程状态
     */
    @Transient
    private String businessStatusName;
}
